package test.lca;

public class Clock {
	
	private long startTime;
	private long endTime;
	private String title;
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Clock() {
		startTime = 0;
		endTime = 0;
	}
	
	public Clock(String title) {
		startTime = 0;
		endTime = 0;
		this.title = title;
	}
	
	
	public void start() {
		System.out.println();
		System.out.println("********** START CALCULATE SPEED OF " + title + "**********");
		startTime = System.currentTimeMillis();
	}
	public void end() {
		endTime = System.currentTimeMillis();
		System.out.println("Time to process " + title +  " : " + (endTime - startTime) + " (ms)");
		System.out.println("********** END   CALCULATE SPEED OF " + title + "**********");
		System.out.println();
	}
}
